package com.biz.primus.model.oms.stream;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *
 *
 *
 *
 * @author yanweijin
 * @date 2017/11/16
 */
public interface OrderStateChannel {

	/**
	 * 订单被取消时推送的消息
	 */
	String ORDER_CANCEL = "oms-order-cancel";

	/**
	 * 订单开始配送时推送的消息
	 */
	String ORDER_DELIVERY_BEGIN = "oms-order-delivery-begin";

	/**
	 * 订单取消配送时推送的消息
	 */
	String ORDER_DELIVERY_CANCEL = "oms-order-delivery-cancel";


	/**
	 * 新增订单
	 */
	String ORDER_BEGIN = "oms-order-begin";

	/**
	 * 分单成功时发送的消息
	 */
	String ORDER_ALLOCATED = "oms-order-allocated";

	/**
	 * 订单打印时发送消息的渠道
	 */
	String ORDER_PRINTED = "oms-order-printed";

	/**
	 * 订单出库时发送消息的渠道
	 */
	String ORDER_OUTBOUND = "oms-order-outbound";

	/**
	 * 订单完成时发送消息的渠道
	 */
	String ORDER_FINISHED = "oms-order-finished";


	/**
	 * 当前渠道传递的数据
	 * orderCode和orderId都会传递
	 */
	@Data
	@AllArgsConstructor
	@NoArgsConstructor
	class OrderStreamData {
		private String orderCode;
		private String expectedDepotCode;
	}

	/**
	 * 订单状态发生变化时发生消息的渠道
	 */
	String ORDER_STATE_CHANGE = "oms-order-state-change";

	/**
	 * ORDER_STATE_CHANGE 渠道传递的数据
	 */
	@Data
	class OrderStateChangeNotice{
		private String orderCode;
		private String depotCode;
	}


}
